  import request from '@/utils/request'

// 查询新生报到列表
export function listBaodao(query) {
  return request({
    url: '/student/baodao/list',
    method: 'get',
    params: query
  })
}

// 查询新生报到详细
export function getBaodao(id) {
  return request({
    url: '/student/baodao/' + id,
    method: 'get'
  })
}

// 新增新生报到
export function addBaodao(data) {
  return request({
    url: '/student/baodao',
    method: 'post',
    data: data
  })
}

// 修改新生报到
export function updateBaodao(data) {
  return request({
    url: '/student/baodao',
    method: 'put',
    data: data
  })
}

// 删除新生报到
export function delBaodao(id) {
  return request({
    url: '/student/baodao/' + id,
    method: 'delete'
  })
}

  // 批量导入新生报到数据
  export function importAllStudents() {
    return request({
      url: '/student/baodao/insterAll',
      method: 'post'
    })
  }
  // 批量导入新生报到数据
  export function importAllBoShiStudents() {
    return request({
      url: '/student/baodao/insterAllBoshi',
      method: 'post'
    })
  }
  export function importStudents() {
    return request({
      url: '/student/baodao/instertostudent',
      method: 'post'
    })
  }

  // 启动异步导入
  export function startImport() {
    return request({
      url: '/student/baodao/startImport',
      method: 'post'
    })
  }

  // 查询导入进度
  export function getImportProgress(batchNo) {
    return request({
      url: `/student/baodao/importProgress/${batchNo}`,
      method: 'get'
    })
  }
  // 启动异步导入
  export function startBoShiImport() {
    return request({
      url: '/student/baodao/startBoShiImport',
      method: 'post'
    })
  }

  // 查询导入进度
  export function getImportBoShiProgress(batchNo) {
    return request({
      url: `/student/baodao/importBoShiProgress/${batchNo}`,
      method: 'get'
    })
  }